package com.tl.khadmin.controller;
 
import java.util.Map; 

import javax.annotation.Resource;
import javax.servlet.http.HttpSession; 

import org.springframework.stereotype.Controller; 
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.tl.khadmin.bean.CostAdjust; 
import com.tl.khadmin.page.Page;
import com.tl.khadmin.service.CostAdjustIService; 
import com.tl.khadmin.util.CommonUtil; 

@Controller
@RequestMapping(value = "/costadjust")
public class CostAdjustController {
	
	@Resource
	private CostAdjustIService costAdjustService;

	@RequestMapping(value = "/page")
	public @ResponseBody Map<String, Page<CostAdjust>> showVipByPage(HttpSession session, int pageNum, int pageSize,
			@RequestParam Map<String, Object> params) { 
		return CommonUtil.returnResultCodeJson("result", costAdjustService.showByPage(session, pageNum, pageSize, params));
	}
	
	@RequestMapping(value = "/save")
	@ResponseBody
	public String save(HttpSession session, CostAdjust costAdjust) {
		return costAdjustService.save(session, costAdjust);
	}   
}